package com.hutra.utils {
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	
	public class ButtonEffect {
		
		public function ButtonEffect() {
		}
		
		public function regisButtion(object:MovieClip):void {
			object.addEventListener(MouseEvent.MOUSE_OVER, functionmouseover);
			object.addEventListener(MouseEvent.MOUSE_OUT, functionmouseout);
			object.addEventListener(MouseEvent.MOUSE_DOWN, functionmousedown);
			object.addEventListener(MouseEvent.MOUSE_UP, functionmouseup);
		}
		
		public function functionmouseout(evt:MouseEvent):void {
			evt.currentTarget.gotoAndStop(1);
		}
		
		public function functionmouseover(evt:MouseEvent):void {
			evt.currentTarget.gotoAndStop(2);
		}
		
		public function functionmousedown(evt:MouseEvent):void {
			evt.currentTarget.gotoAndStop(3);
		}
		
		public function functionmouseup(evt:MouseEvent):void {
			evt.currentTarget.gotoAndStop(1);
		}
	}

}
